<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class GoodsHome extends Model
{
    protected $table = 'goods_home';
    public $timestamps = false;

    const STATUS_OPEN = 1; // 正常
    const STATUS_CLOSE = 2; // 关闭
    const STATUS = [
        self::STATUS_OPEN => '启用',
        self::STATUS_CLOSE => '停用'
    ];

    public function getAll()
    {
        return self::where('status',self::STATUS_OPEN)->get()->toArray();
    }


}
